﻿@model MobileSales.Model.Orders.Order

@{
    View.Title = Strings.Orders + " - " + Strings.Details;
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>@Strings.Orders &nbsp;&raquo;&nbsp; @Strings.Details</h2>

<fieldset>
    <legend>@Strings.Fields</legend>

    <div class="display-label">@ModelStrings.Client</div><br />
    @Html.ClientIdentity(Model.ClientId)
    <br /><br />

    <div class="display-label">@ModelStrings.Date</div>
    <div class="display-field">@Model.Date.ToShortDateString()</div>

    <div class="display-label">@ModelStrings.OrderStatus</div>
    <div class="display-field">@Model.Status.Name</div>
    <br />
    @Html.ActionLink(Strings.AddItem, "AddItem", new { orderId = Model.Id }, new { @class = "icon-button add-icon" }) | 
    @Html.ActionLink(Strings.CreateDocument, "Create", "Documents" , new { orderId = Model.Id }, new { @class = "icon-button document-icon" })
    <br /><br />

    @Html.Partial("_OrderItemList", Model.Items)

</fieldset>
<p>
    @Html.ActionLink(Strings.Edit, "Edit", new { id=Model.Id }, new { @class = "icon-button edit-icon" }) |
    @Html.ActionLink(Strings.BackToList, "Index", null, new { @class = "icon-button prev-icon" })
</p>
